package com.runewbie.pafcmall.product.vo.sku;

import com.runewbie.pafcmall.product.entity.SkuImagesEntity;
import com.runewbie.pafcmall.product.entity.SkuInfoEntity;
import com.runewbie.pafcmall.product.entity.SpuInfoDescEntity;
import lombok.Data;

import java.util.List;

/**
 * @author: li_jian
 * @version: 1.0
 * @date: 2021/3/8 21:37
 * @description： 商品详情vo
 */
@Data
public class SkuItemVo {
    //1.获取sku的基本信息 pms_sku_info
    private SkuInfoEntity info;

    //2.获取sku的图片信息 pms_sku_images
    private List<SkuImagesEntity> images;

    //3.获取spu的所有销售属性
    private List<SkuItemSalesAttrVo> saleAttrs;

    //4.获取spu的介绍
    private SpuInfoDescEntity desc;

    //5.获取规格参数组及组下的规格参数
    private List<SpuItemAttrGroupVo> groupAttrs;

    @Data
    public static class SkuItemSalesAttrVo{
        /**
         * 属性id
         */
        private Long attrId;
        /**
         * 属性名
         */
        private String attrName;
        /**
         * 属性值
         */
        private List<String> attrValues;
    }

    @Data
    public static class SpuItemAttrGroupVo {
        private String groupName;
        private List<SpuBaseAttrVo> attrs;
    }

    @Data
    public static class SpuBaseAttrVo{
        private String attrName;
        private String attrValue;
    }
}
